package org.hagopa.games.moneypool.network;

import java.util.HashMap;
import java.util.Set;

public class IPList {
	private static IPList _instance = null;
	private static HashMap<String,Boolean> CurrentIP = new HashMap<String, Boolean>();
	
	private IPList()
	{
		System.out.println("Creating IP List.....");
	}
	
	public static IPList getInstance()
	{
		if(null == _instance)
		{
			_instance = new IPList();
		}
		return _instance;
	}
	public static Boolean findIP(String ipString)
	{
		return CurrentIP.get(ipString);
	}
	public static void appendIP(String ipString)
	{
		if(CurrentIP.containsKey(ipString) == true)
		{
			if(CurrentIP.get(ipString).equals(new Boolean(true)))
				return;
		}
		CurrentIP.put(ipString, true);
	}
	public static void dropAllInactive()
	{
		Set<String> keys = CurrentIP.keySet();
		if(keys.isEmpty())
			return;
		
	}
}
